package org.jflame.uid.objectid;

import org.jflame.uid.IDGenerateException;
import org.jflame.uid.IDGenerator;

/**
 * 基于mongodb objectid生成方案实现
 * 
 * @author charles.zhang
 */
public class ObjectIdGenerator implements IDGenerator<String> {

    @Override
    public String nextId(String key) throws IDGenerateException {
        return ObjectId.get()
                .toHexString();
    }

}
